# @Time    : 2022/7/16 14:04
# @Author  : mobai
# @Email   : 3111283671@qq.com
# @File    : xstj_page.py
# @Software: PyCharm

from selenium.webdriver.support.select import Select
from pages.xiansuo_page import XianSuoPage
from selenium.webdriver.common.by import By
from time import sleep

class XstjPage(XianSuoPage):
    """线索统计页面"""
    url = "http://192.168.1.151/crm/index.php?m=leads&a=analytics"
    XZYG = (By.ID, "role")
    DJSS = (By.XPATH, "//*[@id='searchForm']/ul/li[4]/button")

    def xzyg(self,xzyg):
        """选择员工admin"""
        locator = self.driver.find_element(*self.XZYG)
        select = Select(locator)
        select.select_by_visible_text(xzyg)

    def djss(self):
        """点击搜索"""
        self.driver.find_element(*self.DJSS).click()